import requests
from lxml.html import fromstring
# response = requests.get("https://www.baidu.com")

# print(type(response.text))
# print(response.text)

# print(type(response.content))
# print(response.content.decode("utf-8"))

# response = requests.get("https://www.baidu.com/s")

params = {
  "wd":"中国"
}
headers = {
    'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36'
}

response = requests.get("https://www.amazon.com/dp/B014P0K2A8", headers=headers)


with open('baidu.html','w',encoding="utf-8") as fp:
  fp.write(response.content.decode('utf-8'))
